package com.mini.repository;

import com.mini.model.BusinessChanceUserProfile;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.Collection;
import java.util.List;
import java.util.Set;

@Repository
public interface BusinessChanceUserProfileRepository  extends JpaRepository<BusinessChanceUserProfile, Long>, JpaSpecificationExecutor<BusinessChanceUserProfile> {

    List<BusinessChanceUserProfile> findByChanceId(Long chanceId);

    List<BusinessChanceUserProfile> findByChanceIdIn(Set<Long> chanceIds);

    BusinessChanceUserProfile findFirstByChanceIdAndProfileType(Long chanceId, String profileType);


}
